/*
 *    Copyright (c) 2018-2025, tdf All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: tdf
 */

package com.engine4cloud.tdf.admin.api.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 租户
 *
 * @author tdf
 * @date 2019-05-15 15:55:41
 */
@Data
@Schema(description = "租户信息")
@EqualsAndHashCode(callSuper = true)
public class SysTenant extends Model<SysTenant> {

    private static final long serialVersionUID = 1L;

    /**
     * 租户id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "租户id")
    @ExcelProperty("租户id")
    private Long id;

    /**
     * 租户名称
     */
    @Schema(description = "租户名称")
    @ExcelProperty("租户名称")
    private String name;

    /**
     * 租户编号
     */
    @Schema(description = "租户编号")
    @ExcelProperty("租户编号")
    private String code;

    /**
     * 租户域名
     */
    @Schema(description = "租户域名")
    @ExcelProperty("租户域名")
    private String tenantDomain;

    /**
     * 网站名称
     */
    @Schema(description = "网站名称")
    @ExcelProperty("网站名称")
    private String websiteName;

    /**
     * logo
     */
    @Schema(description = "logo")
    @ExcelProperty("logo")
    private String logo;

    /**
     * footer
     */
    @Schema(description = "footer")
    @ExcelProperty("footer")
    private String footer;

    /**
     * 移动端二维码
     */
    @Schema(description = "移动端二维码")
    @ExcelProperty("移动端二维码")
    private String miniQr;

    /**
     * 登录页图片
     */
    @Schema(description = "登录页图片")
    @ExcelProperty("登录页图片")
    private String background;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    @ExcelProperty("开始时间")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间")
    @ExcelProperty("结束时间")
    private LocalDateTime endTime;

    /**
     * 0正常 9-冻结
     */
    @Schema(description = "租户冻结标记,9:冻结,0:正常")
    @ExcelProperty("租户冻结")
    private String status;

    @Schema(description = "租户菜单ID")
    @ExcelProperty("租户菜单ID")
    private String menuId;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "修改人")
    private String updateBy;

    /**
     * 删除标记
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记,1:已删除,0:正常")
    private String delFlag;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}
